This invention relates to function graphing software, and more particularly to graphing software that detects and more renders discontinuities, including asymptotes.
Electronic calculators have become an essential tool for students. Students of all levels have a wide choice of calculator types and models.
Many students still own relatively inexpensive scientific calculators with one or two line displays, but recently more and more students are discovering the advantages of graphing calculators. Graphing calculators are characterized by a larger screen, which permits the entry of mathematical expressions in a logical format. They also permit graph displays and table displays. They have sophisticated programming capability. They often permit data transmission to other computing devices, directly or via a data storage medium, as well as data collection via various interface protocols.
When graphing, conventional graphing calculators tend to assume that every function is continuous. They do not properly render functions across asymptotes and other discontinuities. In general, the problem is one of determining when not to connect points that are not supposed to be connected.
The graphing software used by graphing calculators is typically more streamlined than graphing software used for execution on general purpose computers. The latter may more readily implement complex algorithms, such as algorithms designed to handle discontinuities. One function graphing software package that attempts to deal with discontinuities is marketed under the product name DERIVE from Soft Warehouse, Inc. It attempts to provide graphs in which points are not connected when there appears to be a discontinuity. Graphing calculators sometimes implement a simple scheme to not connect graph points which are outside the y-range of the graphing window on opposite sides. This may be based also on information obtained from other nearby plotted points, but such schemes are extremely unreliable and do nothing to detect jump discontinuities.
Another type of mathematics software that might attempt to detect discontinuity is root solver software. However, root solvers typically apply an iterative procedure over a single, small interval that is determined by the user to be one which may contain a root and which may contain a discontinuity instead. Graphing software, on the other hand, is typically applied over much larger ranges containing many intervals of interest, and the user does not provide any information about which intervals may contain discontinuities.
One aspect of the invention is a computer-implemented method of detecting discontinuities in functions. The method is especially suitable for graphing calculators, because of the speed and efficiency with which it may be performed with a general purpose processor.
First, a set of function values is calculated. Each successive pair of function values determines a line segment that approximates a small piece of the function curve. Any pair of line segments having an angle between them greater than a predetermined threshold angle is detected. For each such pair of line segments, at least one of the segments is bisected and a new function value is calculated at the bisection point. This new function value is analyzed to determine if the function is continuous. The analysis involves determining whether the new function value is between the function values on either end of the bisected segment. The bisecting and analyzing steps may be repeated for a predetermined number of iterations, with the process ending if the function is concluded to be continuous or discontinuous there. Further processing may be performed to determine the type of discontinuity and its behavior.
An advantage of the invention is that discontinuities are reliably detected. This leads to improved graphical rendering. The method meets processing constraints imposed by graphing calculators. For function graphing, as opposed to root solving, cost is a significant consideration because they are many intervals to consider not just one. When there are no discontinuities, the processing overhead is slight.